<?
	//TODO: clear current status message, update where status = "active" set status = ""
include_once('config.php');
include_once('model/friend_requests.php');

if (isset($_GET["id"])){
	$user_id = $_GET["id"];

	$requests = new FriendRequests();
	$requests->requestee_id = Session::user()->id;
	$requests->requester_id = $user_id;
	$requests->delete();
}

header("Location: friends.php");
?>